cmake_minimum_required(VERSION 3.0)

project(RetroSnake)

# link_directories(lib)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fPIC")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_subdirectory(src)

# unit test
include_directories(src/include)
add_subdirectory(lib/googletest)
enable_testing()
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})

add_executable(UnitTest tst/Test.cpp)
target_link_libraries(UnitTest SnakerPlayer)
target_link_libraries(UnitTest gtest gtest_main)
# set_target_properties(UnitTest PROPERTIES LINK_FLAGS "-static-libgcc -static-libstdc++ -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive")